package com.example.pureman.myapplication;

import android.app.Application;
import android.content.res.Configuration;

import com.example.pureman.myapplication.utils.CrashHandler;

/**
 * Created by kkkkk on 2016/4/19.
 */
public class MyApplication extends Application {

    private static MyApplication singleton;

    public static MyApplication getSingleton() {
        return singleton;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        singleton = this;

        int memoryCache = (int) (Runtime.getRuntime().maxMemory() / 8);

        CrashHandler crashHandler = CrashHandler.getInstance();
        crashHandler.init(getApplicationContext());
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
    }
}
